<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="itheima" uri="http://itheima.com/common/"%>
<%@ include file="/common/base.jsp"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
 <link rel="stylesheet" href="<%=path%>/css/pintuer.css">
<link rel="stylesheet" href="<%=path%>/css/admin.css">
<script src="<%=path%>/js/jquery.js"></script>
<script src="<%=path%>/js/pintuer.js"></script>

</head>
<body>
	<form method="post"  id="listform">
		<div class="panel admin-panel">
			<div class="panel-head">
				<strong class="icon-reorder">菜品列表</strong>
			</div>
			<div class="padding border-bottom">
				<ul class="search" style="padding-left:10px;">
					<form method="post" action="${pageContext.request.contextPath }/orderList/list.action" >
					<li>搜索：</li>
					<li>
					<input type="text" placeholder="请输入菜品编号" name="vegetable_id"
						class="input" value="${vegetable_id }" id="vegetable_id"
						style="width:250px; line-height:17px;display:inline-block" />
						<button type="submit" class="button border-main icon-search"> 
						 搜索</button></li>
				</ul>
			</div>
			
			<div class="row">
			<div class="col-lg-12">
				<div class="panel panel-default">
					<!-- /.panel-heading -->
			
	
			<table class="table table-hover text-center">
			<thead>
			<tr><th><a class="button border-main" 
								 onclick= "query()">
								<span class="icon-edit"></span> 购买</a></th><th></th><th></th><th></th><th></th></tr>
				<tr>
				    <th>选择</th>
					<th>菜品编号</th>
					<th>菜品名称</th>
					<th>菜品描述</th>
					<th>价钱</th>
				</tr>
				
				<tr>
				</thead>
					
	             <tbody>
							<c:forEach items="${page.rows}" var="row">
								<tr>
								<td><input name="ids" type="checkbox" value="${row.vegetable_id}" /></td>
									<td>${row.vegetable_id}</td>
									<td>${row.vegetable_name}</td>
									<td>${row.describes}</td>
									<td>${row.price}</td>	
					
								</tr>
							</c:forEach>
						</tbody>
						</form>
					</table>	

					<div class="col-md-12 text-right">
						<itheima:page url="${pageContext.request.contextPath }/vegetable/list.action" />
					</div>
		<!-- /.panel-body -->
				</div>
				<!-- /.panel -->
			</div>
			<!-- /.col-lg-12 -->
		</div>
		</div>
		
	</form>
	<script type="text/javascript">
  function query(){
      $("#listform").attr("action","${pageContext.request.contextPath }/order/createOrder.action");
	  $("#listform").submit();
  }
  
</script>
</body>
</html>
